package com.fallsvc.re.javase.codeblock;

/**
 * @auther falls_vc
 * description:
 * @date 2025/10/11  9:00
 */
public class Student {
    private int age = 10;

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }

    private static String n = "hello";
    public Student () {
        age = 30;
        n = "aaaaaa!";
    }
    {
        System.out.println("实例代码块!");
        age = 20;
    }
    static {
        System.out.println("静态代码块!");
        n = "world!!";
    }
    public void print() {
        System.out.println(" age =" + age);
        System.out.println(" n =" + n);
    }

    public static void main(String[] args) {
        Student s = new Student();
        s.print();
    }
}
